<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            width: 100%;
            height: 50px;
            border-bottom:solid 1px #000;
        }


        #box2{
            width: 300px;
            height: 50px;
        }
        #box2::after{
            content: '';
            display:block;
            position:absolute;
            width: 100%;
            height: 1px;
            background: #000;
            left: 0;
            bottom: 0;
        }
        #container{
            height: 200px;
            position: relative;
        }
        @media screen and (-webkit-min-device-pixel-ratio: 2) {
            #box2::after{
                transform: scaleY(0.5);
            }
        }
        @media screen and (-webkit-min-device-pixel-ratio: 3) {
            #box2::after{
                transform: scaleY(0.333);
            }
        }
    </style>
</head>
<body>
    <div id="container">
        <div id="box"></div>

        <div id="box2"></div>
    </div>
</body>
</html>